package com.cn.wanxi.service;

import com.cn.wanxi.dao.CompanyDao;
import com.cn.wanxi.model.CompanyModel;

/**
 * 服务逻辑层
 * 在这里来封装数据，处理数据的逻辑关系
 */
public class CompanyService {

    /**
     * 封装数据
     * 这里面时不能直接存放数据
     * 逻辑关系
     *
     * @return
     */
    public CompanyModel getCompanyModel() {
        CompanyModel companyModel = new CompanyModel();
        CompanyDao companyDao = new CompanyDao();
        companyModel.setLogo(companyDao.getLogo());
        companyModel.setPhone(companyDao.getPhone());
        companyModel.setNet(companyDao.getNet());
        companyModel.setLinePhone(companyDao.getLinePhone());
        companyModel.setEmail(companyDao.getEmail());
        companyModel.setAddress(companyDao.getAddress());
        companyModel.setVersion(companyDao.getVersion());
        companyModel.setAd(companyDao.getAd());
        return companyModel;
    }
}
